# force C++20
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

include_directories (${PROJECT_SOURCE_DIR}/include)
find_package(Poco REQUIRED COMPONENTS Foundation Net JSON)
add_library(${PROJECT_NAME}_driver ${PROJECT_SOURCE_DIR}/src/driver.cpp)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/src/decode2simple.cpp)
target_link_libraries(${PROJECT_NAME} yaml-cpp pthread ${PROJECT_NAME}_driver ${Poco_LIBRARIES})

install(
    TARGETS ${PROJECT_NAME}
    # RUNTIME DESTINATION ${PROJECT_SOURCE_DIR}/bin
)